/*
	Error.cpp

	Contains the error handling system for the SnowstormX engine

	Author: Aidan Goddard 7/8/14
*/

#include<cstdlib>
#include<Windows.h>
#include"Error.h"

// static data
HWND Snowstorm::Error::main_window_hwnd = NULL;

// main error signalling function
void Snowstorm::Error::SignalError(wchar_t *caption, wchar_t *error_message)
{
	// hide the main window
	ShowWindow(Snowstorm::Error::main_window_hwnd, SW_HIDE);

	// show the error message
	MessageBox(Snowstorm::Error::main_window_hwnd, error_message, caption, MB_ICONERROR);

	// finished
	exit(-1);
}